prepareQuery(); $table = $config->sql_tablename_publish_de(); $table_img = $config->sql_tablename_pictures(); $shortcode_passkey = $config->shortcode_passkey(); $pdo = $conn->prepareQuery(); $picpath = $config->picture_storepath(); $maxPageCount = $config->catg_max_results(); $page = $func->stripHtml($_REQUEST['p']); $CategoryName = strtolower($func->stripHtml($_REQUEST['i'])); $CategoryID = $func->categoryNametoID($CategoryName); $catgN = ucfirst($CategoryName); $GoogleUserID = md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR']); $deviceTypeMobile = $detect->isMobile(); $deviceTypeTablet = $detect->isTablet(); $robots = "INDEX,FOLLOW,ALL"; $imageRetArray = $func->getScreenResolutionFromUA($startpage); $x = $imageRetArray["x"]; $y = $imageRetArray["y"]; $fontsize = $imageRetArray["fontsize"]; $picQuality = $imageRetArray["picQuality"]; $stmt = $pdo->prepare("SELECT * FROM $table WHERE id>0 AND p_isonline=1 AND p_star=1 ORDER BY p_starcount DESC, p_timestamp DESC LIMIT 20"); $stmt->execute(); $myRowCount = $stmt->rowCount(); $all_row_count = 0; $row_count = 0; $pre_html = '
'; $aft_html = '
'; $content_html .= $pre_html; $h_tag_open = '

'; $h_tag_close = '

'; while($rows = $stmt->fetch(PDO::FETCH_ASSOC)) { $row_count++; $all_row_count++; $headline = $rows["p_headline"]; $article = $rows["p_articletext"]; $author = $rows["p_authorname"]; $backlink = $rows["p_backlink"]; $shortcode = $rows["p_shortcode"]; $category_id = $rows["p_category"]; $pic_descr = $rows["p_picture_1_description"]; $catg_array = $config->array_category(); $category = $catg_array[$category_id]; $list_time = explode(" ",trim($rows["p_timestamp"])); $timestamp = $list_time[0]." um ".$list_time[1] ." Uhr"; $linkingcode = "https://www.buzzerstar.com/".$func->makeArticleLink($shortcode); $list = explode(". ", $article); $result = substr($article, 0, 120); $content_html .=<<
Bildbeschreibung: $pic_descr
Bildbeschreibung: $pic_descr
$h_tag_open $headline $h_tag_close

$result ...

END; if ( $row_count == 1){ $row_count = 0; $h_tag_open = '

'; $h_tag_close = '

'; $content_html .= $aft_html.$pre_html; } if ( $all_row_count == 1){ $content_html .=<<

END; } } $content_html .= ''; $copyYear = 2012; $curYear = date('Y'); $year = $copyYear . (($copyYear != $curYear) ? '-' . $curYear : ''); $copy = "©$year BuzzerStar.com - M.Sc. Sebastian Enger"; $LinkableCatgID = $config->category_to_show(); $category_content = '

END; $otherTexte =<<categoryTexte(); $categoryHeaderText = $arrayCategoryHeaderText[$CategoryID]; if (strlen($categoryHeaderText) < 50 ){ $categoryHeaderText = $otherTexte; } $description_text = trim(substr($categoryHeaderText, 0, 150)); $description_text .= " ..."; $shareButtons =<<Teile in Sozialen Netzwerken:
Teile den Inhalt mit deinen WhatsApp Freunden    Teile den Inhalt mit deinen Facebook Freunden   Teile den Inhalt mit deinen Pinterest Freunden   Teile den Inhalt mit deinen Google Plus Freunden   Teile den Inhalt mit deinen Stumpleupon Freunden

END; if ($deviceTypeMobile === FALSE || $deviceTypeTablet === FALSE ) { $shareholic_js =<< var addthis_config = { data_ga_property: 'UA-35911242-1', data_ga_social: true }; END; $sharebuttons_js =<<"https://www.buzzerstar.com/images/logo_header.png"), // change for final version array('copyright'=>$copy), array('robots'=>"$robots"), array('title'=>"Die beliebtesten Neuigkeiten und Top News auf BuzzerStar"), array('description'=>$description_text), array('author'=>"M.Sc. Sebastian Enger"), array('html_content'=>$content_html), array('canonical'=>"https://www.buzzerstar.com/trending/"), array('page_content'=>$page_html), array('category'=>$catgN), array('breadcrumb_content'=>$category_content), array('category_header_text'=>$categoryHeaderText), array('share_this_content_buttons'=>$shareButtons), array('shareaholic_javascript'=>$shareholic_js), array('sharebuttons_div'=>$sharebuttons_div), array('sharebuttons_js'=>$sharebuttons_js), array('inlineCSS'=>$func->getInlineCSS()), array('USER_ID'=>$GoogleUserID) ); $design->setPath( "/home/wwwbuzzerstar/tpl-new/" ); $design->display_cache('trending_de', $content, true, 3600*24*3); $stmt = null; // doing this is mandatory for connection to get closed $pdo = null; exit(0); ?>